package com.jintian.smart.kernel.switching.entity;

import lombok.Data;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.Column;
import org.beetl.sql.annotation.entity.Table;

@Data
@Table(name = "mda_TableDMLWatch")
public class TableDMLWatch {
    public static final String OPERATION_UPSERT = "UPSERT";
    public static final String OPERATION_DELETE = "DELETE";
    @AssignID
    @Column(name = "tableName")
    private String tableName;

    @Column(name = "primaryKey")
    private String primaryKey;

    /**
     * 需要记录的操作，UPSERT、DELETE
     */
    private String operation;

    /**
     * 删除时需要记录的字段值，例如存储的文件路径，需要删除文件。
     */
    @Column(name = "recordFields")
    private String recordFields;
}
